package com.sitech.ibnms.util.charts.fusion;

import java.lang.reflect.Method;

public class ChartParameter {

	private String div_id = "";/*����div id*/
	
	private String chartPath = "";
	
	private String chartId = "";
	
	private String chartWidth = "";
	
	private String ChartHeight = "";

	public String getDiv_id() {
		return div_id;
	}

	public void setDiv_id(String div_id) {
		this.div_id = div_id;
	}

	public String getChartPath() {
		return chartPath;
	}

	public void setChartPath(String chartPath) {
		this.chartPath = chartPath;
	}

	public String getChartId() {
		return chartId;
	}

	public void setChartId(String chartId) {
		this.chartId = chartId;
	}

	public String getChartWidth() {
		return chartWidth;
	}

	public void setChartWidth(String chartWidth) {
		this.chartWidth = chartWidth;
	}

	public String getChartHeight() {
		return ChartHeight;
	}

	public void setChartHeight(String chartHeight) {
		ChartHeight = chartHeight;
	}
	
	public static String[] getParamVaule(ChartParameter parameter,String[] paramName) {
		// paramName
		// ��paramName����ĸ��д
		Class clazz = parameter.getClass();
		String paramValue[] = new String[paramName.length];
		try {
			Object classInstance = parameter;
			int idx = 0 ;
			for (String param : paramName) {
				Method method = clazz.getMethod("get" + param);
				paramValue[idx] = (String)method.invoke(classInstance);
				idx ++;
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		return paramValue;
	}
}
